<?php
/**
 * initd for HTTP environmet
 *
 * @version 0.2a
 */

// No direct access
defined( "__DEENZO__" ) or die( "deenzo$" );

function initd() {

	/** Init Database socket */
	DB() or kill( "DB$" );
	
	/** INITTAB to system scripts */
	inittab( "-runlevel 0 -kind initd -uid root" );
	
	/** Executing CRON-daemons */
	etc( "cron.d" ) or kill( "cron.d$" );
	
	crond();
	
	/* Loading Scheduler */
	sbin( "sched" );
	
	/** Starting X11 ( X-Window environment ) */
	etc( "X.org" ) or kill( "X.org$" ); 
	
	/** Lauching Application */
	usr( "bootstrap" ) or kill( "bootstrap$" );
	
	bootstrap();
	    
}

function shutdown() {
    inittab( "-runlevel 0 -kind shutdown -uid root" );
	
	/* Saving TEXTDOMAIN to cache */
	session("cache.textdomain", env("textdomain") );
	
	session("cache.rel", env("rel") );
}